Dynomotion

Group: DynoMotion Message: 7164 From: fireup_kev Date: 4/2/2013
Subject: V4.30 & V4.31b Reconnect Bug in KMotionCNC
In version V4.30 and V4.31b, when the KFLOP loses connection either by power off/on or by USB disconnect/reconnect. KMotionCNC program goes into a "weird" mode that does not allow the machine to jog properly. It seems as though a different kinematics gets activated and multiple axis will move with just one jog button?? When the jog button is pressed, the machine moves but the display does not update. It also seem to activate some internal soft-limit with the jog button. The only way to get out of this mode is to quit KMotionCNC and restart it again.
Group: DynoMotion Message: 7165 From: Lee Studley Date: 4/2/2013
Subject: Re: V4.30 & V4.31b Reconnect Bug in KMotionCNC
From the earlier posts, I would guess that you need to implement the
INIT button, or a startup thread to init.

You should also have a relay to disable motor drives until the init
function does its work then enables the drives via this relay.

JMO -Lee

On 4/2/2013 12:12 PM, fireup_kev wrote:
> In version V4.30 and V4.31b, when the KFLOP loses connection either by power off/on or by USB disconnect/reconnect. KMotionCNC program goes into a "weird" mode that does not allow the machine to jog properly. It seems as though a different kinematics gets activated and multiple axis will move with just one jog button?? When the jog button is pressed, the machine moves but the display does not update. It also seem to activate some internal soft-limit with the jog button. The only way to get out of this mode is to quit KMotionCNC and restart it again.
>
>
>
Group: DynoMotion Message: 7166 From: fireup_kev Date: 4/2/2013
Subject: Re: V4.30 & V4.31b Reconnect Bug in KMotionCNC
I do have an INIT button. Everything seems to work fine if I restart KMotionCNC each time I disconnect KFLOP or reboot KFLOP. If I disconnect power to KFLOP while KMotionCNC is running and power the board back up, it does not re-sync properly and begin acting weird. Hitting the INIT button initializes the board but still does not sync up with KMotionCNC. This problem does not show up in version 4.29

To make sure it was not related to my hardware, I tested this problem with just a KFLOP and a USB cord and power the KFLOP off the USB cord and nothing else connected…
1.Run KMotion, open up Axis screen…
2.Run KMotionCNC, assign "INIT" button to "InitStepDir3Axis.c"
3.Hit "Init" and first 3 drives enables and DRO on KMotionCNC turns green.
4.Hold a Jog button on KMotionCNC and everything seems to work fine to this point.
5.Now pull the USB wire to the KFLOP. And hit "OK" to the disconnection screen.
6.KMotion.exe says it's disconnected while KMotionCNC still thinks it's connected and showing green on the DRO.
7.Plug the KFLOP back in and KMotion.exe says it's connected.
8.Hit "Init" in KMotionCNC and the board initialize and enables. And Dest display goes to zero.
9.Hold a Jog button on KMotionCNC, the DRO does no change but values in KMotion.exe does change.
10.When Dest gets to 20000.0 It stops as if it hit a soft limit.

--- In DynoMotion@yahoogroups.com, Lee Studley <indigo_red@...> wrote:
>
> From the earlier posts, I would guess that you need to implement the
> INIT button, or a startup thread to init.
>
> You should also have a relay to disable motor drives until the init
> function does its work then enables the drives via this relay.
>
> JMO -Lee
>
> On 4/2/2013 12:12 PM, fireup_kev wrote:
> > In version V4.30 and V4.31b, when the KFLOP loses connection either by power off/on or by USB disconnect/reconnect. KMotionCNC program goes into a "weird" mode that does not allow the machine to jog properly. It seems as though a different kinematics gets activated and multiple axis will move with just one jog button?? When the jog button is pressed, the machine moves but the display does not update. It also seem to activate some internal soft-limit with the jog button. The only way to get out of this mode is to quit KMotionCNC and restart it again.
> >
> >
> >
>
Group: DynoMotion Message: 7167 From: Tom Kerekes Date: 4/2/2013
Subject: Re: V4.30 & V4.31b Reconnect Bug in KMotionCNC
Hi Kevin,

You are correct that is a bug in KMotionCNC.exe.  Once a MessageBox pops up that originates from within the KMotionCNC Status Timer then status forever no longer updates.  The fix is in

void CKMotionCNCDlg::OnTimer(UINT nIDEvent)

to change

    if (Entry++>0) return;  // do not allow re-entries

to

    if (Entry>0) return;  // do not allow re-entries
    Entry++;



There is also a patched KMotionCNC.exe here that will work with Version 4.31b

http://dynomotion.com/Software/Patch/FixKFLOPtoKMotionCNCMsgBox/

Sorry about that.

Regards
TK




Group: DynoMotion Message: 7168 From: fireup_kev Date: 4/2/2013
Subject: Re: V4.30 & V4.31b Reconnect Bug in KMotionCNC
Tom,

I made the change to the source and recompiled and everything seems good so far.

Thanks,
Kevin

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Kevin,
>
> You are correct that is a bug in KMotionCNC.exe.  Once a MessageBox pops up that originates from within the KMotionCNC Status Timer then status forever no longer updates.  The fix is in
>
>
> void CKMotionCNCDlg::OnTimer(UINT nIDEvent)
>
> to change
>
>     if (Entry++>0) return;  // do not allow re-entries
>
> to
>
>
>     if (Entry>0) return;  // do not allow re-entries
>     Entry++;
>
>
>
> There is also a patched KMotionCNC.exe here that will work with Version 4.31b
>
> http://dynomotion.com/Software/Patch/FixKFLOPtoKMotionCNCMsgBox/
>
> Sorry about that.
>
>
> Regards
> TK
>
>
>
>
>
>
> ________________________________
> From: fireup_kev <kliboon@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, April 2, 2013 12:12 PM
> Subject: [DynoMotion] V4.30 & V4.31b Reconnect Bug in KMotionCNC
>
>
>  
> In version V4.30 and V4.31b, when the KFLOP loses connection either by power off/on or by USB disconnect/reconnect. KMotionCNC program goes into a "weird" mode that does not allow the machine to jog properly. It seems as though a different kinematics gets activated and multiple axis will move with just one jog button?? When the jog button is pressed, the machine moves but the display does not update. It also seem to activate some internal soft-limit with the jog button. The only way to get out of this mode is to quit KMotionCNC and restart it again.
>